#pragma once

#define WIN32_LEAN_AND_MEAN		// Exclude rarely-used stuff from Windows headers

// Windows Header Files:

#define NOMINMAX
#include <windows.h>
#include <windowsx.h>

#include <crtdbg.h>

#define _VS2005_
#if _MSC_VER < 1400
	#undef _VS2005_
#endif

// C RunTime Header Files
#include <stdlib.h>
#include <malloc.h>
#include <memory.h>
#include <tchar.h>

#include <mmsystem.h>

#include <algorithm>
#include <string>
#include <list>
#include <vector>
#include <queue>
#include <map>

using std::tr1::shared_ptr;
using std::tr1::weak_ptr;
using std::tr1::static_pointer_cast;
using std::tr1::dynamic_pointer_cast;

class ANG_noncopyable 
{  
     private:  
      ANG_noncopyable(const ANG_noncopyable& x);  
      ANG_noncopyable& operator=(const ANG_noncopyable& x);  
     public:  
      ANG_noncopyable() {}; // Default constructor  
};  


#if defined(_DEBUG)
#	define ANG_NEW new(_NORMAL_BLOCK,__FILE__, __LINE__)
#else
#	define ANG_NEW new
#endif

#define DXUT_AUTOLIB

// DirectX Includes
#include "ThirdParty\DXUT\DXUT.h"
//#include <dxut.h>
//#include <d3dx9tex.h>
//#include <dxut.h>
//#include <SDKmisc.h>

#include "ThirdParty\tinyxml2\tinyxml2.h"

// fast delegate stuff
#include "ThirdParty\FastDelegate\FastDelegate.h"
using fastdelegate::MakeDelegate;

#pragma warning( disable : 4996 ) 

// GameCode #includes
//#include "..\Debugging\Logger.h"  // this should be the first of the gcc includes since it defines GCC_ASSERT()
//#include "..\Utilities\types.h"
//#include "..\Utilities\templates.h"
//#include "..\Graphics3D\geometry.h"

typedef D3DXCOLOR Color;

extern Color g_White;
extern Color g_Black;
extern Color g_Cyan;
extern Color g_Red;
extern Color g_Green;
extern Color g_Blue;
extern Color g_Yellow;
extern Color g_Gray40;
extern Color g_Gray25;
extern Color g_Gray65;
extern Color g_Transparent;

extern const float fOPAQUE;
extern const int iOPAQUE;
extern const float fTRANSPARENT;
extern const int iTRANSPARENT;

extern const int MEGABYTE;
extern const float SIXTY_HERTZ;

extern const int SCREEN_WIDTH;
extern const int SCREEN_HEIGHT;

#if !defined(SAFE_DELETE)
	#define SAFE_DELETE(x) if(x) delete x; x=NULL;
#endif

#if !defined(SAFE_DELETE_ARRAY)
	#define SAFE_DELETE_ARRAY(x) if (x) delete [] x; x=NULL; 
#endif

#if !defined(SAFE_RELEASE)
	#define SAFE_RELEASE(x) if(x) x->Release(); x=NULL;
#endif

#ifdef UNICODE
	#define _tcssprintf wsprintf
	#define tcsplitpath _wsplitpath
#else
	#define _tcssprintf sprintf
	#define tcsplitpath _splitpath
#endif


//extern INT WINAPI AppMain(HINSTANCE hInstance,
//                     HINSTANCE hPrevInstance,
//                     LPWSTR    lpCmdLine,
//                     int       nCmdShow);